Skip to content

Allow "fleet_name" to be either string or string array in "task_request"#64

Open
lttey wants to merge 2 commits into
open-rmf:mainfrom
lttey:feat/task_to_fleets
Open

Allow "fleet_name" to be either string or string array in "task_request"#64
lttey wants to merge 2 commits into
open-rmf:mainfrom
lttey:feat/task_to_fleets

Conversation

@lttey

@lttey lttey commented Jul 7, 2026

Copy link
Copy Markdown

as refer to feature request

This PR is about to enable task dispatch to subset of fleets.

In scenario where -F -R is specified for task request, fleet_name shall be a string instead of array.

@mxgrey mxgrey added this to PMC Board Jul 7, 2026
@github-project-automation github-project-automation Bot moved this to Inbox in PMC Board Jul 7, 2026
@lttey lttey changed the title Allow task_request fleet_name to be a string or string array Allow fleet_name to be either string or string array in "task_request" Jul 7, 2026
@lttey lttey changed the title Allow fleet_name to be either string or string array in "task_request" Allow "fleet_name" to be either string or string array in "task_request" Jul 7, 2026
2. Reject array in fleet_name for robot specific tasks

Signed-off-by: lttey <leong_teck_tey@cgh.com.sg>
@lttey
lttey force-pushed the feat/task_to_fleets branch from 4421818 to e54de22 Compare July 9, 2026 06:22
@mxgrey
mxgrey self-requested a review July 14, 2026 01:32
@mxgrey mxgrey moved this from Inbox to In Review in PMC Board Jul 14, 2026
"description": "A robot task request always targets exactly one robot, so its nested fleet_name (if given) must be a single string, not an array.",
"allOf": [
{ "$ref": "task_request.json" },
{ "properties": { "fleet_name": { "type": "string" } } }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the purpose here to prevent fleet_name from being an array when the request is included as part of a robot_task_request? If so, I'm not sure what the point would be...

  1. Just because fleet_name has a single string value doesn't mean that string value matches the fleet string in this robot_task_request.
  2. An array for fleet_name could include the fleet string in this robot_task_request, making it a perfectly valid request.
  3. If we were to put additional constraints on fleet_name for robot_task_request it should probably be that there is no fleet_name inside the request.

In short, I don't think adding this constraint does anything to improve the correctness of the schema. I would recommend just reverting the schema here and in estimate_robot_task_request.json to its original form, and leave it to the user to ensure that their fleet and fleet_name values are compatible with each other.

Let me know if there's some other rationale for this change that I'm not thinking of.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mxgrey for your correction. That constraint shouldn't be imposed. Have pushed a commit to undo it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

2 participants